package com.fanqiechaodan.singleton.singleton3;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author fanqiechaodan
 * @Classname demo
 * @Description {https://blog.csdn.net/qq_43135259/article/details/129386971}
 */
public class Demo {

    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(10);
        for (int i = 0; i < 10; i++) {
            executorService.execute(() -> {
                Singleton singleton = Singleton.getInstance();
                System.out.println(singleton);
            });
        }
        executorService.shutdown();
    }
}
